<template>
	<view class="page">

		<index v-if="currentTab==0"></index>
		<me v-if="currentTab==2"></me>

		<u-tabbar v-model="currentTab" active-color="#19be6b" :list="tabBarList" :mid-button="true" @change="changeTab"></u-tabbar>
	</view>
</template>

<script>
	import index from "./index.vue"; //首页
	import me from "./me.vue"; //个人中心

	export default {
		components: {
			me,
			index
		},
		data() {
			return {
				current: 1,
				currentTab: 0,
				tabBarList: [{
						iconPath: "home",
						selectedIconPath: "home-fill",
						text: '首页',
						count: 0,
						customIcon: false,
					},
					{
						iconPath: "https://cdn.uviewui.com/uview/common/min_button.png",
						selectedIconPath: "https://cdn.uviewui.com/uview/common/min_button_select.png",
						text: '注册',
						midButton: true,
						customIcon: false,
					},
					{
						iconPath: "account",
						selectedIconPath: "account-fill",
						text: '我',
						customIcon: false,
					},
				],
				

			}
		},
		methods: {
			changeTab(index) {
				console.log(index);
				switch (index) {
					case 1:
						{
							this.$Router.push({
								name: "corp-register"
							});
							break;
						}

				}
			},

			onShow() {

				this.currentTab = 0;
			},
			onLoad() {

			},
			// onPullDownRefresh(e){
			// 	console.log("onPullDownRefresh",e);
			// }
		}
	}
</script>

<style lang="scss">

</style>
